import { type ReactNode } from "react";
import styles from './card.module.scss';

interface Props {
  title: string;
  icon: ReactNode;
  children?: ReactNode;
}

function Card(props: Props) {
  return (
    <div className={styles['card-wrap']}>
      <div className={styles['card-header']}>
        <span>{props.title}</span>
        <span className={styles['card-header-icon']}>{props.icon}</span>
      </div>

      <div className={styles['card-body']}>
        {props.children}
      </div>
    </div>
  );
}


export { Card };